#pragma once
#include "common_data.h"

struct VisualInfo {
	QString id;
	QString ip;		// 相机IP
	QString brand;
	QString visPath;	// 视觉服务路径
	QString path;	// 图片存储路径
	QString biaoding;	// 标定文件路径
	QString algName;	// 算法类型
};




struct VisRecogParam {
	QString path;
};


#include "json_trans.h"

json_struct(RecRect,
	mappingt(int, x1, "P1X");
mappingt(int, y1, "P1Y");
mappingt(int, x2, "P2X");
mappingt(int, y2, "P2Y");
mappingt(int, x3, "P3X");
mappingt(int, y3, "P3Y");
mappingt(int, x4, "P4X");
mappingt(int, y4, "P4Y");
prop(&x1, &x2, &x3, &x4, &y1, &y2, &y3, &y3);
);

json_struct(RecResult,
	mapping(QList<RecRect>, rects);
prop(&rects);
)


struct VisualResult {
	int index;
	bool valied;
	QString rgb;
	QString depth;
	RecResult rect;
};
